-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
catch rlp exception: debug_traceBlock #7204
Conversation
Can you take a look also what happens in debug_traceBlockByNumber and debug_traceBlockByHash on genesis block? |
I'm getting similar errors , I added exception for them as well {
"jsonrpc": "2.0",
"error": {
"code": -32603,
"message": "Internal error",
"data": "System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.\n ---> System.ArgumentNullException: Value cannot be null. (Parameter 'block')\n at System.ArgumentNullException.Throw(String paramName)\n at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName)\n at Nethermind.Consensus.Tracing.GethStyleTracer.TraceBlock(Block block, GethTraceOptions options, CancellationToken cancellationToken) in /_/src/Nethermind/Nethermind.Consensus/Tracing/GethStyleTracer.cs:line 196\n at Nethermind.JsonRpc.Modules.DebugModule.DebugRpcModule.debug_traceBlockByHash(Hash256 blockHash, GethTraceOptions options) in /_/src/Nethermind/Nethermind.JsonRpc/Modules/DebugModule/DebugRpcModule.cs:line 190\n at InvokeStub_IDebugRpcModule.debug_traceBlockByHash(Object, Span`1)\n at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\n --- End of inner exception stack trace ---\n at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\n at Nethermind.JsonRpc.JsonRpcService.ExecuteAsync(JsonRpcRequest request, String methodName, ResolvedMethodInfo method, JsonRpcContext context) in /_/src/Nethermind/Nethermind.JsonRpc/JsonRpcService.cs:line 169"
},
"id": 1
} |
catch (ArgumentNullException) | ||
{ | ||
return ResultWrapper<IReadOnlyCollection<GethLikeTxTrace>>.Fail($"Couldn't find any block", ErrorCodes.InvalidInput); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can't happen here as it is RLP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be inside the TraceBlock
function
src/Nethermind/Nethermind.JsonRpc/Modules/DebugModule/DebugRpcModule.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will we return for genesis after this PR?
What about debug_traceTransaction and other tracing methods?
In case of genesis block, the results are {
"jsonrpc": "2.0",
"result": [],
"id": 1
} for both the cases. And, for |
Fixes #7195
Please choose one of the keywords above to refer to the issue this PR solves followed by the issue number (e.g. Fixes #000). If no issue number, remove the line. Also, remove everything marked optional that is not applicable. Remove this note after reading.
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Optional. Remove if not applicable.
Documentation
Requires documentation update
If yes, link the PR to the docs update or the issue with the details labeled
docs
. Remove if not applicable.Requires explanation in Release Notes
If yes, fill in the details here. Remove if not applicable.
Remarks
Optional. Remove if not applicable.